<?php
/* @var $this PostController */
/* @var $model Post */
/* @var $form CActiveForm */
Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl.'/lib/ckeditor/ckeditor.js');
?>

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'edit-form',
	'enableClientValidation' => true,
	'clientOptions'=> array('validateOnSubmit'=>true),
	'htmlOptions' => array('class'=>'form-horizontal')
)); ?>

<?php if($model->hasErrors()): ?>
	<?php echo $form->errorSummary($model); ?>
<?php endif ?>
	
<div class="tabbable tabs-left">
	<ul class="nav nav-tabs">
		<li class="active"><a data-toggle="tab" href="#t1">General Information</a></li>
		<li><a data-toggle="tab" href="#t2">Meta Information</a></li>
		<li><a data-toggle="tab" href="#t3">Tags</a></li>
	</ul>
	<div class="tab-content"> 
		<div id="t1" class="tab-pane active"><?php $this->renderPartial('form/general', array('form'=>$form, 'model'=>$model)) ?></div> 
		<div id="t2" class="tab-pane"><?php $this->renderPartial('form/meta', array('form'=>$form, 'model'=>$model)) ?></div> 
		<div id="t3" class="tab-pane"><?php $this->renderPartial('form/tag', array('form'=>$form, 'model'=>$model)) ?></div> 
	</div>
</div>

<?php $this->endWidget(); ?>

